/**
 * Created by thw on 2018/5/31.
 */
function Land3d_Lib_onStopDrawing(t) {

    //绘制贴地线，绘制完后，插值贴地
    if(t.polyline!=undefined&&t.polyline.positions.getValue().length>1)
    {
        function e() {
            s++;
            var h = [n[s - 1], n[s]];
            Land3D.drawing.utils.terrainPolyline({
                viewer: viewer,
                positions: h,
                calback: function (u, d) {
                    if (c = d ? 1 == s ? c.concat(h) : c.concat([n[s]]) : c.concat(u),
                        s >= n.length - 1) {
                        t.polyline.positions.setValue(c)
                    } else {
                        e()
                    }
                }
            })
        }

        if (null != t.polyline) {
            var i = this
                , n = t.polyline.positions.getValue()
                , s = 0
                , c = [];
            e()
        }
        t.polyline.terrain=true;


    }

    if(toolOp==20){
        PullframeOverLay=t;
        var coordinates=t.rectangle.coordinates.getValue();

        var strPolygon="POLYGON((";//起始点要一致
        var west=Cesium.Math.toDegrees(coordinates.west);
        var south=Cesium.Math.toDegrees(coordinates.south);
        var east=Cesium.Math.toDegrees(coordinates.east);
        var north=Cesium.Math.toDegrees(coordinates.north);

        strPolygon+=west+" "+south+",";
        strPolygon+=east+" "+south+",";
        strPolygon+=east+" "+north+",";
        strPolygon+=west+" "+north+",";
        strPolygon+=west+" "+south;
        strPolygon+="))";
        getQContains(strPolygon);

        t.dataid="cx_-1";
    }else{
        t.dataid="new_-1";
    }
}
